from typing import Optional, Any
from fastapi import Query
from pydantic import BaseModel

class CallTasksCreateRequest(BaseModel):
    customer_ids: Optional[list[str]] = None
    random_count: Optional[int] = None
    task_name: str
    created_by: str
    channel: str

class CallTasksCreateResponse(BaseModel):
    task_id: int
    total_count: int
    message: str

class CallTasksListRequest(BaseModel):
    page: int = Query(1, description="页码")
    page_size: int = Query(10, description="每页大小")
    status: Optional[str] = Query(None, description="任务状态过滤")
    created_by: Optional[str] = Query(None, description="创建人过滤")

class CallTasksListResponse(BaseModel):
    tasks: list[Any]    #list[CallTasks]
    total: int



class CallTaskCustomerRequest(BaseModel):
    page: int = Query(1, description="页码")
    page_size: int = Query(10, description="每页大小")
    call_status: Optional[str] = Query(None, description="通话状态过滤")

class CallTaskCustomerResponse(BaseModel):
    customers: list[Any]    #list[Customers]
    total: int
    task_info: Any  # CallTasks

class CallTaskCustomerUpdateRequest(BaseModel):
    call_status: str
    call_result: Optional[str]= None